cmake_minimum_required(VERSION 3.10)
project(SocketExamples C)

set(CMAKE_C_STANDARD 99)

add_executable(hostname hostname.c)
add_executable(tcp_server tcp_server.c)
add_executable(tcp_server_mt tcp_server_mt.c)
add_executable(tcp_client tcp_client.c)
add_executable(tcp_client_mt tcp_client_mt.c)
add_executable(udp_server udp_server.c)
add_executable(udp_client udp_client.c)

find_package(Threads REQUIRED)
target_link_libraries(tcp_client_mt Threads::Threads)
target_link_libraries(tcp_server_mt Threads::Threads)
